<?php
if(!defined("ADMREAD")) exit();
global $a,$conf,$sess,$lang,$ADMIN_PERM_ARRAY,$ADMIN_ID,$CHECK_ADMIN;
$block = array();
if (in_array('down',$ADMIN_PERM_ARRAY) || in_array($ADMIN_ID,$CHECK_ADMIN['admid'])) {
    $block['id'] = 'down';
    $block['title'] = $lang['menu_down'];
    $block['link'] = array(
    'down.php?dn=index&ops='.$sess['hash'] => $lang['all_set'],
    'down.php?dn=downlist&ops='.$sess['hash'] => $lang['down_all'],
    'down.php?dn=downcat&ops='.$sess['hash'] => $lang['all_cat'],
    'down.php?dn=downcatadd&ops='.$sess['hash'] => $lang['all_add_cat'],
    'down.php?dn=downadd&ops='.$sess['hash'] => $lang['down_add']
    );
    if($conf['fbroken'] == 'yes'){
        $block['link'] = @array_merge($block['link'],
        array(
        'down.php?dn=downbrokenlist&ops='.$sess['hash'] => $lang['menu_no_access']
        )
        );
    }
    if ($conf['ftags'] == 'yes') {
        $block['link'] = @array_merge($block['link'],array('down.tag.php?dn=index&ops='.$sess['hash'] => $lang['all_tags']));
    }
    if ($conf['fcomact'] == 'yes') {
        $block['link'] = @array_merge($block['link'],array('down.php?dn=downcomment&ops='.$sess['hash'].(($a) ? '&ajax=1' : '') => array($lang['menu_comment'],true)));
    }
}
?>